package principle.facade;

/**
 * @author malguy-wang sir
 * @create ---
 */
public class homeThreaderFacade {
    private DVDPlayer dvdPlayer;
    private popcorn popcorn;
    private projector projector;
    private screen screen;
    private stereo stereo;
    private theaterLight theaterLight;

    public homeThreaderFacade() {
        this.dvdPlayer = DVDPlayer.getInstance();
        this.popcorn = popcorn.getInstance();
        this.projector = projector.getInstance();
        this.screen = screen.getInstance();
        this.stereo = stereo.getInstance();
        this.theaterLight = theaterLight.getInstance();
    }
    public void ready(){
        //爆米花准备
        popcorn.on();
        popcorn.pop();
        //屏幕、投影仪准备
        screen.up();
        projector.on();
        //立体声、dvd播放机、灯光
        stereo.on();
        dvdPlayer.on();
        theaterLight.on();
    }
    public void play(){
        dvdPlayer.play();
    }
    public void pause(){
        dvdPlayer.pause();
    }
    public void end(){
        popcorn.off();
        screen.down();
        projector.off();
        stereo.off();
        dvdPlayer.off();
    }
}
